<template>
    <div id="centreLeft1">
        <div class="bg-color-black">
            <div class="d-flex pt-2 pl-2">
        <span style="color:#5cd9e8">
          <icon name="chart-pie"></icon>
        </span>
                <div class="d-flex">
                    <span class="fs-xl text mx-2">库存数量前十雷达图</span>
                    <dv-decoration-1 style="width:1.25rem;height:.25rem; position:relative;top:-.0375rem;"/>
                </div>
            </div>
            <div class="d-flex jc-center">
                <centreLeft2Chart :chart-data="storePriceData"/>
            </div>
        </div>
    </div>
</template>

<script>
    import centreLeft2Chart from "@/components/echart/centerLeft2/centreLeft2Chart";
    import {storeAllPriceTop} from '@/api/report'

    export default {
        data() {
            return {
                storePriceData: {}

            };
        },
        components: {
            centreLeft2Chart
        }, created() {
            this.setStorePriceTop();
        },
        mounted() {
        },
        methods: {
            setStorePriceTop(){
                storeAllPriceTop().then(response=>{
                    if (response.code == 'success') {
                        this.storePriceData = response.data;
                        this.storePriceData.yaxis.forEach((item, index) => {
                            item = Math.round(item/1000)

                        })
                        console.log(JSON.stringify(this.storePriceData))


                    }
                })
            }
        }
    };
</script>

<style lang="scss">
    #centreLeft1 {
        padding: 0.2rem;
        height: 5.125rem;
        min-width: 3.75rem;
        border-radius: 0.0625rem;

        .bg-color-black {
            height: 4.8125rem;
            border-radius: 0.125rem;
        }

        .text {
            color: #c3cbde;
        }

        .chart-box {
            margin-top: 0.2rem;
            width: 2.125rem;
            height: 2.125rem;

            .active-ring-name {
                padding-top: 0.125rem;
            }
        }
    }
</style>